import request from './index'

export const getBooks = (params) => request.get('/books', { params })
export const getBookDetail = (id) => request.get(`/books/${id}`)
export const getCategories = () => request.get('/books/categories')
export const getBookStats = () => request.get('/books/stats')
export const getCategoryTree = () => request.get('/books/category-tree')
export const getSubcategories = (params) => request.get('/books/subcategories', { params })
export const getCategorySankey = () => request.get('/books/category-sankey')
export const getCategoryKeywords = (params) => request.get('/books/category-keywords', { params })
export const getCategoryHealth = (params) => request.get('/books/category-health', { params })
export const getPriceDistribution = () => request.get('/dashboard/price-distribution')
export const getCategoryTop10 = () => request.get('/dashboard/category-top10')
export const getPriceTrend = (params) => request.get('/dashboard/price-trend', { params })
export const getDashboardOverview = () => request.get('/dashboard/overview')
